/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.plechinger.mcremote.client;

import java.security.NoSuchAlgorithmException;
import java.util.Locale;
import java.util.ResourceBundle;

/**
 *
 * @author Lukas
 */
public class Client {

    private ResourceBundle resourceBundle;

    private Client() {
        loadResources(Locale.getDefault());
        gui();
    }

    private void loadResources(Locale loc) {
        resourceBundle = ResourceBundle.getBundle("messages", loc);
    }

    public ResourceBundle getResourceBundle() {
        return resourceBundle;
    }
    private static Client client = null;

    public static Client getClient() {
        if (client == null) {
            client = new Client();
        }
        return client;
    }

    public static void main(String[] args) {
        Client cl = getClient();       

    }



    private void gui() {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(ClientGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(ClientGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(ClientGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(ClientGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new ClientGUI().setVisible(true);
            }
        });

    }
}
